import request from '@/utils/request'
import BaseUrl from '../BaseUrl'

const systemPath = BaseUrl.getDefaultBaseUrl()
const modulePath = systemPath + '/admin'

export const apiAdmin = {
  list: function(query) {
    return request({
      url: modulePath + '/list',
      method: 'get',
      params: query
    })
  },

  create: function(data) {
    return request({
      url: modulePath + '/create',
      method: 'post',
      data
    })
  },

  read: function(data) {
    return request({
      url: modulePath + '/readmin',
      method: 'get',
      data
    })
  },

  update: function(data) {
    return request({
      url: modulePath + '/update',
      method: 'post',
      data
    })
  },

  delete: function(data) {
    return request({
      url: modulePath + '/delete',
      method: 'post',
      data
    })
  }
}
